package com.shazhu.nongjt.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.shazhu.common.annotation.Excel;
import com.shazhu.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.math.BigDecimal;

/**
 * 合格证基本信息对象 njt_certificate_base
 * 
 * @author shazhu
 * @date 2024-09-28
 */
public class NjtCertificateBase extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private Long id;

    /** 合格证编号 */
    @Excel(name = "合格证编号")
    private String certificateNo;

    /** 食用农产品名称 */
    @Excel(name = "食用农产品名称")
    private String productName;
    /** 数量(重量) - 对应前端的productWeight */
    /** 数量(重量) */
    @Excel(name = "数量(重量)")
    private BigDecimal quantity;

    /** 计量单位 */
    @Excel(name = "计量单位")
    private String unit;

    /** 生产主体 */
    @Excel(name = "生产主体")
    private String companyName;

    /** 主体地址 */
    @Excel(name = "主体地址")
    private String principalAddress;

    /** 产地 */
    @Excel(name = "产地")
    private String produceAddress;

    /** 检测类型 */
    @Excel(name = "检测类型")
    private String testType;

    /** 检测机构 */
    @Excel(name = "检测机构")
    private String testBy;

    /** 检验报告文件路径 */
    @Excel(name = "检验报告文件路径")
    private String testReport;

    /** 用户签名图片路径 */
    @Excel(name = "用户签名图片路径")
    private String userSignature;

    /** 打印份数 */
    @Excel(name = "打印份数")
    private Integer printNumber;

    /** 手机号 */
    @Excel(name = "手机号")
    private String mobilePhone;

    /** 二维码路径 */
    @Excel(name = "二维码路径")
    private String qrcode;

    /** 状态:1-未打印,2-已打印,3-已作废 */
    @Excel(name = "状态:1-未打印,2-已打印,3-已作废")
    private Integer status;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setCertificateNo(String certificateNo) 
    {
        this.certificateNo = certificateNo;
    }

    public String getCertificateNo() 
    {
        return certificateNo;
    }
    public void setProductName(String productName) 
    {
        this.productName = productName;
    }

    public String getProductName() 
    {
        return productName;
    }

    /** 获取前端传递的productWeight字段 */
    @JsonProperty("productWeight") // 添加Jackson注解映射前端字段
    public void setProductWeight(BigDecimal productWeight) {
        this.quantity = productWeight;
    }

    /** 提供给前端使用的字段 */
    @JsonProperty("productWeight")
    public BigDecimal getProductWeight() {
        return this.quantity;
    }
    public void setQuantity(BigDecimal quantity)
    {
        this.quantity = quantity;
    }

    public BigDecimal getQuantity() 
    {
        return quantity;
    }
    public void setUnit(String unit) 
    {
        this.unit = unit;
    }

    public String getUnit() 
    {
        return unit;
    }
    public void setCompanyName(String companyName) 
    {
        this.companyName = companyName;
    }

    public String getCompanyName() 
    {
        return companyName;
    }
    public void setPrincipalAddress(String principalAddress) 
    {
        this.principalAddress = principalAddress;
    }

    public String getPrincipalAddress() 
    {
        return principalAddress;
    }
    public void setProduceAddress(String produceAddress) 
    {
        this.produceAddress = produceAddress;
    }

    public String getProduceAddress() 
    {
        return produceAddress;
    }
    public void setTestType(String testType) 
    {
        this.testType = testType;
    }

    public String getTestType() 
    {
        return testType;
    }
    public void setTestBy(String testBy) 
    {
        this.testBy = testBy;
    }

    public String getTestBy() 
    {
        return testBy;
    }
    public void setTestReport(String testReport) 
    {
        this.testReport = testReport;
    }

    public String getTestReport() 
    {
        return testReport;
    }
    public void setUserSignature(String userSignature) 
    {
        this.userSignature = userSignature;
    }

    public String getUserSignature() 
    {
        return userSignature;
    }
    public void setPrintNumber(Integer printNumber) 
    {
        this.printNumber = printNumber;
    }

    public Integer getPrintNumber() 
    {
        return printNumber;
    }
    public void setMobilePhone(String mobilePhone) 
    {
        this.mobilePhone = mobilePhone;
    }

    public String getMobilePhone() 
    {
        return mobilePhone;
    }
    public void setQrcode(String qrcode) 
    {
        this.qrcode = qrcode;
    }

    public String getQrcode() 
    {
        return qrcode;
    }
    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("certificateNo", getCertificateNo())
            .append("productName", getProductName())
            .append("quantity", getQuantity())
            .append("unit", getUnit())
            .append("companyName", getCompanyName())
            .append("principalAddress", getPrincipalAddress())
            .append("produceAddress", getProduceAddress())
            .append("testType", getTestType())
            .append("testBy", getTestBy())
            .append("testReport", getTestReport())
            .append("userSignature", getUserSignature())
            .append("printNumber", getPrintNumber())
            .append("mobilePhone", getMobilePhone())
            .append("qrcode", getQrcode())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}